package com.flow.controller;
import com.apache.api.api.ApiService;
import com.apache.api.vo.ParamsVo;
import com.apache.api.vo.ResultEntity;
import com.apache.api.vo.ResultMsg;
import com.apache.client.UctCoreClient;
import com.apache.client.UctProtoclClient;
import com.apache.ius.common.annotion.AnnotationUtil;
import com.apache.ius.common.connectors.impl.AdapterFactory;
import com.apache.ius.controller.SuperTransAction;
import com.apache.tools.ConfigUtil;
import com.apache.tools.StrUtil;
import com.apache.uct.common.LoginUser;
import com.apache.uct.common.PBOSSOTools;
import com.apache.uct.common.ToolsUtil;
import net.sf.json.JSONObject;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.HashMap;
import java.util.Map;

/**
 * 平台自动生成的统一控制controller类
 * @Date 2019-4-22 13:59:33
 */
@Controller
public class TransAction extends SuperTransAction {

    @Autowired(required = false)
    @Qualifier("flowService")
    private ApiService flowService;

    /**
     * 初始化方法
     * @throws Exception
     */
    @ModelAttribute
    public void populateModel() throws Exception {
        if(this.iusService==null) {
            this.setIusService(flowService);
        }
        if(!AnnotationUtil.isScanning){
            //自动扫描包(拦截器专用)
            AnnotationUtil.getInstance().loadCalssBean("com.apache.ius");
        }
    }


    /**
    * 跳到ius管理后台首页面
    */
    @RequestMapping(value = "/ius", method = RequestMethod.GET)
    public String index(HttpServletRequest request) throws ServletException, IOException {
        return "/WEB-INF/pages/plateform/admin/index-home-sys";
    }

}


